﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="groupChat.aspx.cs" Inherits="IM_groupChat" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <asp:Literal runat="server" ID="lblTitle"></asp:Literal></title>
    <link href="../CSS/IM.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager2" runat="server">
        <Services>
            <asp:ServiceReference Path="~/Controls/chatProg.asmx" />
        </Services>
        <Scripts>
            <asp:ScriptReference Path="~/js/jquery-1.2.6.min.js" ScriptMode="Release" />
            <asp:ScriptReference Path="~/js/jquery-timer.js" ScriptMode="Release" />
            <asp:ScriptReference Path="~/js/ChatGroupIM.js" ScriptMode="Release" />
            <asp:ScriptReference Path="~/Controls/tiny_mce/tiny_mce.js" />
            <asp:ScriptReference Path="~/js/utilities.js" ScriptMode="Release" />
        </Scripts>
    </asp:ScriptManager>

    <script type="text/javascript">

        tinyMCE.init({

            // General options
            mode: "textareas",
            theme: "advanced",
            plugins: "emotions",
            skin: "o2k7",
            skin_variant: "silver",
            forced_root_block: false,
            force_br_newlines: false,
            force_p_newlines: false,
            // Theme options
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,emotions,forecolor,backcolor",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_buttons4: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_resizing: false,
            submit_patch: "false",
            add_form_submit_trigger: "false",
            add_unload_trigger: "false",

            // Example content CSS (should be your site CSS)
            content_css: "../css/TinyMCEcontent.css",
            setup: function(ed) {
                ed.onKeyUp.add(function(ed, e) {
                    if (e.keyCode == 13) {
                        if (ed.getContent().length > 7)
                            SetGroupMessages(ed.getContent());
                        //                        alert(ed.getContent());
                        ed.setContent("");
                    }
                    //SetMessages(ed)
                });
            }
        });
    </script>

    <div class="groupChatBox">
        <div class="divChatBox">
            <div class="divChatBoxHistory" id="divChatHistory" runat="server">
            </div>
        </div>
        <div>
            <textarea id="elm1" name="elm1" runat="server" style="width: 100%;"></textarea>
        </div>
    </div>
    <div class="groupChatList">
        <asp:ListBox ID="lbUsersInChat" runat="server" CssClass="groupChatListBox" DataValueField="user"
            DataTextField="user"></asp:ListBox>
    </div>
    <asp:HiddenField ID="hfRecipient" runat="server" />
    <asp:HiddenField ID="hfSender" runat="server" />
    <input id="tbChatID" style="display: none;" type="text" />
    <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6812912-1");
pageTracker._trackPageview();
} catch(err) {}</script>
    </form>
</body>
</html>
